﻿using System;
using System.Windows.Media;
using personalplaner.business.extensions;

namespace personalplaner.business.dienstplan
{
    public class DienstPlanRowHeader : ItemBase
    {
        int _prsId;
        public int PrsId
        {
            get { return _prsId; }
            set
            {
                _prsId = value;
                RaisePropertyChanged("PrsId");
            }
        }

        string _nachname;
        public string Nachname
        {
            get { return _nachname; }
            set
            {
                _nachname = value;
                RaisePropertyChanged("Nachname");
            }
        }

        int _abteilungId;
        public int AbteilungId
        {
            get { return _abteilungId; }
            set
            {
                _abteilungId = value;
                RaisePropertyChanged("AbteilungId");
            }
        }

        string _abteilungeName;
        public string AbteilungeName
        {
            get { return _abteilungeName; }
            set
            {
                _abteilungeName = value;
                RaisePropertyChanged("AbteilungeName");
            }
        }

        int _prsSchemaId;
        public int PrsSchemaId
        {
            get { return _prsSchemaId; }
            set
            {
                _prsSchemaId = value;
                RaisePropertyChanged("PrsSchemaId");
            }
        }

        DateTime _von;
        public DateTime Von
        {
            get { return _von; }
            set
            {
                _von = value;
                RaisePropertyChanged("Von");
            }
        }

        DateTime _bis;
        public DateTime Bis
        {
            get { return _bis; }
            set
            {
                _bis = value;
                RaisePropertyChanged("Bis");
            }
        }

        //int _rgb;
        //public int Rgb
        //{
        //    get { return _rgb; }
        //    set
        //    {
        //        _rgb = value;
        //        RaisePropertyChanged("Rgb");
        //    }
        //}
        public int Rgb
        {
            get
            {
                return Color.ToInt();
            }
            set
            {
                if (Color == null)
                    Color = value.ToColor();
            }
        }

        public string ColorString
        {
            get
            {
                return Color.ToArgbString();
            }
            set
            {
                if (Color == null)
                    Color = value.ToColor();
            }
        }

        Color? _color;
        public Color? Color
        {
            get { return _color; }
            set
            {
                _color = value;
                RaisePropertyChanged("Color");
            }
        }

        int _pensum;
        public int Pensum
        {
            get { return _pensum; }
            set
            {
                _pensum = value;
                RaisePropertyChanged("Pensum");
            }
        }
    }
}
